package top.xmj.dao;

import java.util.*;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.xmj.pojo.User;


/**
 * @author 冰咖啡
 * @Date:2/12/2022 下午 9:27
 * @Description: 持久化操作-用户
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 获取所有用户
     * @return
     */
    public List<User> getUsers();

    /**
     * 根据用户名查找用户
     * @param name
     * @return
     */
    public User queryByName(@Param("username") String name);

    /**
     * 根据邮箱地址查找用户
     * @param mail
     * @return
     */
    public User queryByMail(String mail);
}
